package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.model.pojo.TransferRecord;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author zhexueqi
* @description 针对表【transfer_record】的数据库操作Mapper
* @createDate 2025-04-05 02:34:19
* @Entity generator.domain.TransferRecord
*/
public interface TransferRecordMapper extends BaseMapper<TransferRecord> {


    // 查询最近i条记录
    @Select("SELECT * FROM transfer_record WHERE employee_address = #{userAddress} ORDER BY transfer_date DESC LIMIT #{i}")
    List<TransferRecord> selectRecentByUser(String userAddress, int i);
}
